<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
 * Created on 2012-7-23
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
 if(!defined('ADMIN_URL')){
	define('ADMIN_URL',base_url().'application/views/admin/');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php  echo common::_get_setting('blog_title')?></title>
<link style="text/css" href="<?php echo ADMIN_URL;?>css/base.css" rel="stylesheet"/>
<link style="text/css" href="<?php echo ADMIN_URL;?>css/style.css" rel="stylesheet"/>
<script src="<?php echo ADMIN_URL;?>js/jquery.min.js"></script>
<script type='text/javascript'>
$(function(){
	$('#welcome').appendTo($('#menu_li'));
})
</script>
</head>
<body>
	<div class='head w960'>
		<div id="nav">

			<?php if($actionlist = $this->session->userdata('actionlist')):?>
				<?php
					//加载菜单视图
					if(file_exists(APPPATH.MENUPATH.$actionlist.'.PHP')){
						$this->load->view('admin/files/menus/'.$actionlist.'.php');
					}else{
						common::_create_menu_files($actionlist);
						redirect(current_url());
					}
				?>
				<li id='welcome' style="float:right;">
						欢迎你:
						<a href='' style='color:white;' title='用户中心' ><?php echo $this->session->userdata('username');?></a>
						<a href='<?php echo site_url().'/admin/login/logout'?>' style='color:white;' id='logout' title='退出'>退出</a>
				</li>
			<?php else:?>
				<?php
					common::_create_actionlist_session($this->session->userdata('username'));
					redirect(current_url());
				?>

			<?php endif;?>
		</div>
	</div>

